<template>
	<view>
		<uni-grid :column="4" :showBorder="false">
			<uni-grid-item v-for="(item, index) in data" :key="index">
				<view class="grid-item-box" @click="navigateTo(item.router)">
					<uni-icons :type="item.icon" size="30"></uni-icons>
					<text class="text">{{ item.name }}</text>
				</view>
			</uni-grid-item>
		</uni-grid>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: [
					{
						name: '工会法人资格证书',
						icon: 'tune',
						router: 'pages/work/certificateoflegalpersonnel'
					},
					{
						name: '数字卡包',
						icon: 'refresh',
						router: 'pages/work/digitalidentity'
					},
					
					{
						name: '工会入驻1',
						icon: 'refresh',
						router: 'pages/work/unionsettlement'
					},
					{
						name: '工会入驻2',
						icon: 'refreshempty',
						router: 'pages/work/unionsettlement-form'
					},
					{
						name: '工会入驻3',
						icon: 'reload',
						router: 'pages/work/unionsettlement-form-next'
					},
					{
						name: '提交成功',
						icon: 'settings',
						router: 'pages/work/unionsettlement-form-title'
					},
					{
						name: '会员转会',
						icon: 'settings',
						router: 'pages/work/membertransfer'
					},
					{
						name: '填报转会',
						icon: 'shop',
						router: 'pages/work/fillintransfer'
					},
					{
						name: '扫码转会',
						icon: 'shop',
						router: 'pages/work/scancodetransfer'
					},
					{
						name: '入会转会',
						icon: 'smallcircle',
						router: 'pages/work/membershiptransfer'
					},
					{
						name: '申请组织员',
						icon: 'smallcircle',
						router: 'pages/work/applyfororganizer'
					},
					{
						name: '职工入会',
						icon: 'sound',
						router: 'pages/work/employeemembership'
					},
					{
						name: '入会申请',
						icon: 'sound',
						router: 'pages/work/membershipform'
					},
					{
						name: '入会审批超时',
						icon: 'staff',
						router: 'pages/work/submittedsuccessfully'
					},
					{
						name: '会籍管理',
						icon: 'staff',
						router: 'pages/work/membershipmanagement'
					},
					{
						name: '会员管理',
						icon: 'trash',
						router: 'pages/work/membermanagement'
					},
					{
						name: '入会二维码',
						icon: 'trash',
						router: 'pages/work/membershipqrcode'
					},
					{
						name: '审批管理',
						icon: 'tune',
						router: 'pages/work/approvalmanagement'
					},
					{
						name: '审批详情',
						icon: 'tune',
						router: 'pages/work/approvaldetails'
					},
					
					{
						name: '组织员管理',
						icon: 'undo',
						router: 'pages/work/organizationalmanagement'
					},
					{
						name: '审批详情',
						icon: 'undo',
						router: 'pages/work/organizationalreview'
					},
					{
						name: '填报入会',
						icon: 'undo',
						router: 'pages/work/fillinthemembershipform'
					},
					{
						name: '扫码入会',
						icon: 'undo',
						router: 'pages/work/scanthecodetojoin'
					},
					{
						name: '工会选择',
						icon: 'undo',
						router: 'pages/work/tradeUnionSelection'
					},
					
					{
						name: '入会待审批',
						icon: 'undo',
						router: 'pages/work/membershipapprovaldetails'
					},
					{
						name: '入会已审批',
						icon: 'undo',
						router: 'pages/work/transferapprovaldetails'
					},
				
				]
			}
		},
		methods: {
			navigateTo(router) {

				console.log(router);
				this.$tab.navigateTo(`/${router}`)
			}
		}
	}
</script>
<style>
	/* #ifndef APP-NVUE */
	page {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background-color: #fff;
		min-height: 100%;
		height: auto;
	}

	view {
		font-size: 14px;
		line-height: 1.5;
	}

	/* #endif */

	.text {
		text-align: center;
		font-size: 26rpx;
		margin-top: 10rpx;
	}

	.grid-item-box {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
		cursor: pointer;
		/* Add cursor pointer to indicate clickable items */
	}

	@media screen and (min-width: 500px) {
		/* Optional media queries for larger screens */
	}
</style>